/**
 * Copyright (c) 2005-2012 https://github.com/zhangkaitao
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package com.aiwei.tdjk.sys.permission.repository;

import com.aiwei.tdjk.common.reposiotry.base.BaseRepository;
import com.aiwei.tdjk.sys.permission.entity.Role;
import com.aiwei.tdjk.sys.permission.entity.RoleResourcePermission;
import org.springframework.data.jpa.repository.Query;


public interface RoleRepository extends BaseRepository<Role, Long> {

    @Query("from RoleResourcePermission where role=?1 and resourceId=?2")
    RoleResourcePermission findRoleResourcePermission(Role role, Long resourceId);
}
